package com.ruoyi.ebike.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠券购买记录对象 coupon_record
 * 
 * @author ruoyi
 * @date 2025-01-07
 */
public class CouponRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 卡券id */
    @Excel(name = "卡券id")
    private Long couponId;

    /** 折扣金额 */
    @Excel(name = "折扣金额")
    private BigDecimal discount;

    /** 剩余张数 */
    @Excel(name = "剩余张数")
    private Integer validCount;

    /** 有效期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date validTime;

    /** 购买或赠送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "购买或赠送时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date dateTime;

    /** $column.columnComment */
    @Excel(name = "区域权限", readConverterExp = "$column.readConverterExp()")
    private Long deptId;

    /** 0：用户购买 1：系统赠送 */
    @Excel(name = "0：用户购买 1：系统赠送")
    private Integer type;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    /** 购买优惠券的金额 */
    @Excel(name = "购买优惠券的金额")
    private BigDecimal money;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setCouponId(Long couponId) 
    {
        this.couponId = couponId;
    }

    public Long getCouponId() 
    {
        return couponId;
    }
    public void setDiscount(BigDecimal discount)
    {
        this.discount = discount;
    }

    public BigDecimal getDiscount()
    {
        return discount;
    }
    public void setValidCount(Integer validCount)
    {
        this.validCount = validCount;
    }

    public Integer getValidCount()
    {
        return validCount;
    }
    public void setValidTime(Date validTime) 
    {
        this.validTime = validTime;
    }

    public Date getValidTime() 
    {
        return validTime;
    }
    public void setDateTime(Date dateTime) 
    {
        this.dateTime = dateTime;
    }

    public Date getDateTime() 
    {
        return dateTime;
    }
    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }
    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setMoney(BigDecimal money) 
    {
        this.money = money;
    }

    public BigDecimal getMoney() 
    {
        return money;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("couponId", getCouponId())
            .append("discount", getDiscount())
            .append("validCount", getValidCount())
            .append("validTime", getValidTime())
            .append("dateTime", getDateTime())
            .append("deptId", getDeptId())
            .append("type", getType())
            .append("phone", getPhone())
            .append("money", getMoney())
            .toString();
    }
}
